#pragma once

#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <vector>

using namespace std;

class filereader
{
public:

	filereader()
	{
	}

	~filereader()
	{
	}

	string readLetters(string filename)
	{
		ifstream in(filename);
		char c;
		string result = "";
		while (in >> c)
		{
			result += c;
		}
		return result;
	}

	vector<string> readWords(string filename)
	{
		ifstream in(filename);
		vector<string> result;
		string word;
		while (in >> word)
		{
			result.push_back(word);
		}
		return result;
	}

	vector<string> readLines(string filename)
	{
		ifstream in(filename);
		vector<string> result;
		string line;
		while (getline(in, line))
		{
			result.push_back(line);
		}
		return result;
	}

	vector<string> readIp(string filename)
	{
		ifstream in(filename);
		vector<string> result;
		string line;
		while (getline(in, line))
		{
			istringstream iss(line);
			string s;
			getline(iss, s, ' ');
			result.push_back(s);
			getline(iss, s);
			result.push_back(s);
		}
		return result;
	}
};

